.TH PS2ASCII 1 "18 Sept 2024" 10.04.0 "Ghostscript Tools" \" -*- nroff -*-
.SH NAME
ps2ascii \- Ghostscript translator from PostScript or PDF to text
.SH SYNOPSIS
\fBps2ascii\fR [ \fIinput.ps\fR [ \fIoutput.txt\fR ] ]
.br
\fBps2ascii\fR \fIinput.pdf\fR [ \fIoutput.txt\fR ]
.SH DESCRIPTION
\fBps2ascii\fR uses \fBgs\fR(1) to extract text from
\fBPostScript\fR(tm) or Adobe \fBPortable Document Format\fR (PDF)
files. If no files are specified on the command line, \fBgs\fR reads from
standard input.  If no output file is specified, the ASCII text is written
to standard output.
.PP
The old \fBps2ascii.ps\fR program was deprecated and removed some years
ago, the scripts now use the \fBtxtwrite\fR device to extract text from the
input. This does a generally better job than the old PostScript program
and can extract Unicode not just ASCII. However it no longer supports the
\fBCOMPLEX\fR feature.

.SH SEE ALSO
Further documentation on the txtwrite device can be found at
https://ghostscript.readthedocs.io/en/latest/Devices.html#text-output

.SH VERSION
This document was last revised for Ghostscript version 10.04.0.
.SH AUTHOR
Artifex Software, Inc. are the
primary maintainers of Ghostscript.
David M. Jones <dmjones@theory.lcs.mit.edu> made substantial improvements
to \fBps2ascii\fR.
